<%@ tag language="java" pageEncoding="ISO-8859-1"%>

<%@ attribute name="title_webpage" required="true" type="java.lang.String" %>
<%@ attribute name="arg" type="java.lang.String" %>
<%@ attribute name="tab_index" required="false" type="java.lang.Integer" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"%>

<c:set var="ot_version" value="1.0" scope="application" />
<c:set var="url_context" value="${pageContext.request.contextPath}" scope="application" />

<c:set var="url_style" value="${url_context}/styles" scope="application" />
<c:set var="url_script" value="${url_context}/script/ideyatech-${ot_version}" scope="application" />
<c:set var="url_script_iris" value="${url_context}/script" scope="application" />
<c:set var="url_script_lib" value="${url_script_iris}/js-libraries" scope="application" />
<jsp:useBean id="currentUser" class="org.opentides.util.SecurityUtil" />

<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		
		<title>
			<spring:message code="${title_webpage}" arguments="${arg}"/>
		</title>
		
		<script type="text/javascript">
			var url_context = '${url_context}';
		</script>
		
		 <!-- STYLE -->
		<link rel="icon" type="image/x-icon" href="${url_context}/images/favicon.ico" />
		<link rel="stylesheet" type="text/css" href="${url_style}/iris-all.css" />
		<link rel="stylesheet" type="text/css" href="${url_style}/iris-admin-all.css" />
		
		<!-- JQUERY -->
		<script type="text/javascript" src="${url_script_lib}/jquery-1.7.2.js"></script>
	
		<!-- JQUERY UI -->
	    <link rel="stylesheet" type="text/css" href="${url_script_lib}/jquery-ui/theme/jquery.ui.all.css" />
	    <script type="text/javascript" src="${url_script_lib}/jquery-ui/jquery-ui-1.8.22.custom.js"></script>
	    
	    <!-- TINYBOX 2 -->
	    <link rel="stylesheet" type="text/css" href="${url_script_lib}/tinybox2/tinybox.css" />
	    <script src="${url_script_lib}/tinybox2/tinybox.js"></script>
	
	<!-- IDEYATECH SCRIPTS -->
	    <script src="${url_script}/crud.js"></script>
	    <script type="text/javascript" src="${url_script_iris}/iris-all.js"></script>
	  
	  	<jsp:doBody />
	</head>
	
	<body>
	<!-- HEADER -->
	<div id="header">
    	<div class="header-content">
       		<a href="${url_context}/dashboard.jspx"><img id="logo" src="${url_context}/images/logo.png" /></a>

				<div id="user-box" onclick="showUserMenu()" onblur="hideUserMenu()" tabindex="1">
	            	<img src=""/>
	            	<a id="current-user-full-name">${currentUser.user.firstName} ${currentUser.user.lastName}</a>
	            	
	            	<ul id="account-panel" style="display: none;">
	            		<img class="tail" src="${url_context}/images/account-panel-tail.png" />

		            	<a href="${url_context}/j_spring_security_logout"><li>Logout</li></a>
	            	</ul>
	            	
	            </div>
                <div class="clear"></div>
            </div>
        </div>
	<div id="header-menu">
		<div class="header-content">
			<ul style="width: 1100px;">
				<security:authorize ifAnyGranted="ACCESS_DASHBOARD_TAB">
					<li>
						<a href="${url_context}/dashboard.jspx">Home</a>
					</li>
				</security:authorize>
				<security:authorize ifAnyGranted="ACCESS_PATIENTS_TAB">
					<li>
						<a href="${url_context}/patients.jspx">Patients</a>
					</li>
				</security:authorize>
				<security:authorize ifAnyGranted="ACCESS_PROGRAMS_TAB">
					<li>
						<a href="${url_context}/medicalPrograms.jspx">Programs</a>
					</li>
				</security:authorize>
				<security:authorize ifAnyGranted="ACCESS_PROCEDURES_TAB">
					<li>
						<a href="${url_context}/medicalProcedures.jspx">Procedures</a>
					</li>
				</security:authorize>
				<security:authorize ifAnyGranted="ACCESS_DISEASES_TAB">
					<li>
						<a href="${url_context}/diseases.jspx">Diseases</a>
					</li>
				</security:authorize>
				<security:authorize ifAnyGranted="ACCESS_ALLERGENS_TAB">
					<li>
						<a href="${url_context}/allergens.jspx">Allergens</a>
					</li>
				</security:authorize>
				<security:authorize ifAnyGranted="ACCESS_MEDICINES_TAB">
					<li>
						<a href="${url_context}/medicines.jspx">Medicines</a>
					</li>
				</security:authorize>
				<security:authorize ifAnyGranted="ACCESS_USER_ROLE_TAB">
					<li>
						<a href="${url_context}/admin/usergroup.jspx">User Roles</a>
					</li>
				</security:authorize>
				<li>
					<a href="${url_context}/staffs.jspx">Staff</a>
				</li>
			</ul>
		</div>
	</div>
	
<script type="text/javascript">

</script>	
  
	